package sample.negative.service;

import sample.negative.bean.User;

/**
 * 用户管理服务
 */
public class UserManager {

    /**
     * 添加用户
     * @param user
     */
    void addUser(User user) {
        // do something
    }

    /**
     * 编辑用户
     * @param user
     */
    void updateUser(User user) {
        // do something
    }

    /**
     * 根据id获取用户信息
     * @param id
     * @return
     */
    User getUserById(int id) {
        // do something
        return new User();
    }

    /**
     * 用户认证
     * @param username
     * @param password
     * @return
     */
    boolean authenticateUser(String username, String password) {
        // do something
        return true;
    }

    /**
     * 权限检查
     * @param user
     * @param permission
     * @return
     */
    boolean checkPermission(User user, String permission) {
        // do something
        return true;
    }

    /**
     * 发送邮件通知
     * @param user
     * @param subject
     * @param body
     */
    void sendEmailNotification(User user, String subject, String body) {
        // do something
    }
}
